#pragma once
#ifndef HEAP_H
#define HEAP_H

#include <stdio.h>
#include <stdlib.h>

typedef int HPDataType;

typedef struct Heap {
    HPDataType* _a;
    int _size;
    int _capacity;
} Heap;

Heap* HeapCreate(HPDataType* a, int n);
void HeapDestroy(Heap* hp);
void HeapPush(Heap* hp, HPDataType x);
void HeapPop(Heap* hp);
HPDataType HeapTop(Heap* hp);
int HeapSize(Heap* hp);
int HeapEmpty(Heap* hp);

void HeapPrint(Heap* hp);

#endif /* HEAP_H */

